<? /* license

BilugCMS (http://www.bilug.it) - Content Management System for dynamic web sites
Copyright (C) 2005-2008  Federico Villa and Alessio Loro Piana

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

For reference, contact bilugcms@vilnet.it


license */ ?>
<?

require_once("auth.php");
require_once("../utility/connessione.php");
require_once("../utility/funzioni.php");

$id = $_GET["id"];

$query="SELECT utente, cognome, nome, mail, data, articoli, indirizzo, citta, cap, id, importo FROM acquisti WHERE id = '$id'";
$acquisto= mysql_query($query);
$acq = mysql_fetch_row($acquisto);
$art = explode(';' , $acq[5]);

/*$i=1;
while($art[$i])
{
	$querytit="SELECT titolo FROM ecommerce WHERE codice = '$art[$i]'";
	$arttit= mysql_query($querytit);
	$artic = mysql_fetch_row($arttit);
	$articoli = $articoli."<br>".$artic[0];
	$i++;
}*/

?>
<h3>Dati Cliente</h3>
<div class="contenitore"><div class="azzerafloat"></div>
<div class="float100"> <h5>Nome:</h5></div>
<div class="float200"> <?echo "$acq[1]"?></div>
<div class="float100"> <h5>Cognome:</h5> </div>
<div class="float300"> <?echo "$acq[2]"?></div>
<div class="float100"> <h5>Data acquisto:</h5></div>
<div class="float100"> <?echo "$acq[4]"?></div>
<div class="azzerafloat"><br /></div>
<div class="float100"> <h5>E-mail:</h5></div>
<div class="float230">  <?echo "$acq[3]"?></div>
<div class="azzerafloat"><br /></div>
<div class="float100"> <h5>Indirizzo: </h5></div>
<div class="float200"> <?echo "$acq[6]"?></div>
<div class="float70"> <h5>CAP: </h5></div>
<div class="float140"> <?echo "$acq[8]"?></div>
<div class="float100"> <h5>Citta:</h5> </div>
<div class="float160"> <?echo "$acq[7]"?></div>
<div class="azzerafloat"><br /></div>
<div class="float100"> <h5>Transazione:</h5></div>
<div class="float200"> <?echo "$acq[0]"?></div>
<div class="float100"> <h5>Importo Totale:</h5></div>
<div class="float100">  <?echo "$acq[10]"?> &euro;</div>
<div class="azzerafloat"><br /></div>
</div><br>
<h3>Articoli Acquistati</h3>
<div class="contenitore">
<?
foreach ($art as $key => $valore) {
	if ($valore!=""){
	echo "<div class=\"azzerafloat\"><br /></div>";
	echo "<div class=\"float160\"><h5>Codice articolo e titolo ($key):</h5></div>";
	echo "<div class=\"float400\">$valore</div>";
	}
}
?>
<div class="azzerafloat"></div><br /><br />
<div class="float70"><img src="./img/ind.png" id="ico" /><a title="|Torna Indietro" href="area.php?pag=gestione_acquisti.php">Indietro</a></div>
<br>					
</div>
